import axios from '../axios.js';
import {
    CLAIMS
} from './const.js'

export default {
    getClaims(data) {
        return axios({
            url: CLAIMS + "/getClaims",
            method: "get",
            params: {
                pageSize: data.pageSize,
                currentPage: data.currentPage
            }
        });
    },
    addClaims(data) {
        return axios({
            url: CLAIMS + "/addClaims",
            method: "post",
            data
        });
    },
    deleteClaims(data) {
        return axios({
            url: CLAIMS + "/deleteClaims",
            method: 'post',
            data: {
                _id: data
            }
        })
    },
    getClaimsById(data) {
        // console.log(data);
        return axios({
            url: CLAIMS + "/getClaimsById",
            method: 'post',
            data: {
                _id: data
            }
        })
    },
    // 确认修改
    updateClaims(data) {
        return axios({
            url: CLAIMS + "/updateClaims",
            method: 'post',
            data
        })
    },
    disposeOrdersClaims(data) {
        return axios({
            url: CLAIMS + "/disposeOrdersClaims",
            method: "post",
            data
        });
    },


}